home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 March - Disc 1
/
Macworld (1999-03) (Disk 1).dmg
/
Shareware World
/
Comms & Internet
/
Mac CallerID© 1.2.4
/
AppleScripts
/
Mac CallerID -> Deskbots Script
< prev
next >
Wrap
Text File
|
1998-11-08
|
1KB
|
35 lines
tell application "Mac CallerID (FAT)"
-- Version 1.1 - fixes numeric test and swaps last/first name on announcement.
-- Version 1.2 - gets last call instead of first call and inserts a space between first/last names to aid speech
-- NOTE THESE FEATURES ARE ONLY AVAILABLE TO REGISTERED USERS!!!!
-- THEY WILL NOT WORK UNLESS YOU HAVE RECEIVED A PERSONAL PASSWORD
-- CallerInfo is the apple event object class
-- calls are returned as a text string
-- call order is name, number, date, and time.
-- get the first call
set firstCall to (get last CallerInfo)
set test to character 1 of word 3 of firstCall
-- tell Deskbots to announce it
-- we check if the name has 3 parts or just a first/last name.
if test ≥ 0 and test ≤ 9 then
tell application "DeskBots"
TALK "<ALARM>" & word 2 of firstCall & " " & word 1 of firstCall & "is calling. Please answer the phone."
end tell
else
tell application "DeskBots"
TALK "<ALARM>" & words 1 through 3 of firstCall & "is calling. "
end tell
end if
end tell